﻿/******************************************************************
** 文 件 名: Bu_DocReceive_View.aspx.cs
** Copyright (c) 2010-2012 Honestysoft (GuangZhou) Co.,LTD
** 创 建 人: 蔡少鹏
** 创建日期: 2012-3-21 1:28:04
** 描    述: 资料接收表查看页面
** 版    本: 2.0.0.0
** 修改描述:
** 修 改 人:
** 修改日期:
******************************************************************/
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Honestysoft.BaseObject;
using Honestysoft.Baseframework.WebUI;
using Honestysoft.Financing.Model;


namespace Honestysoft.Financing.WebUI.Module.Audit
{
	public partial class Bu_DocReceive_View : BasePage
	{	
		protected override void Page_Load(object sender, EventArgs e)
        {
			base.Page_Load(sender, e);
            if (!IsPostBack)
            {
                Bind();
            }
        }
        /// <summary>
        /// 绑定页面
        /// </summary>
        private void Bind()
        {
            Bu_DocReceive obj = new BaseBusinessLogic<Bu_DocReceive>().GetEntity(Request.QueryString["ID"]);
            if (obj == null) { return; }

           BD_Contract  contract = new BusinessLogic.Contract(Globals.CurrentConnStringName).GetContract(obj.ContractID);
           _ContractName = contract.Name;
           _ProjectCode = contract.ProjectCode;
           _ProjectName = contract.ProjectName;
           _Owner = contract.OwnerName;
           _Contractor = contract.ContractorName;
            
            string[] arrCompID = new string[] { obj.FromCompany, obj.ToCompany };
            DataTable dtComp = new Honestysoft.Financing.BusinessLogic.Reports(Globals.CurrentConnStringName).GetCompanyName(arrCompID);
            DataRow[] rows = null;
            rows = dtComp.Select("ID='" + obj.FromCompany + "'");
            if (rows != null && rows.Length == 1)
            {
              _FromCompany = rows[0]["CompName"].ToString();
            }
            rows = dtComp.Select("ID='" + obj.ToCompany + "'");
            if (rows != null && rows.Length == 1)
            {
              _ToCompany = rows[0]["CompName"].ToString();
            }

            _ID = obj.ID;
            _Code = obj.Code;
            _ContractID = obj.ContractID;
            _Amount = obj.Amount.ToString("0.00");
            _Other = obj.Other;
           // _FromCompany = obj.FromCompany;
            _FromEmployee = obj.FromEmployee;
            //_ToCompany = obj.ToCompany;
            _ToEmployee = obj.ToEmployee;
            _ToEmployeeName = obj.ToEmployeeName;
            _ReceiveDate = obj.ReceiveDate.ToString("yyyy-MM-dd");
            _CreateTime = obj.CreateTime.ToString("yyyy-MM-dd");
            _Creator = obj.Creator;
            _FromEmployeePhone = obj.FromEmployeePhone;
            _DocRecieveStatus = Honestysoft.EnumHelper.EnumInstance.GetEnumDataText(obj.DocRecieveStatus);
            if (obj.IsPD1)
            {
                _IsPD1_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD1_2 = ScriptHelper.Image.GetBooleanImage(true);
            }
            _PD1 = obj.PD1;
            if (obj.IsPD2)
            {
                _IsPD2_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD2_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD2 = obj.PD2;
            if (obj.IsPD3)
            {
                _IsPD3_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD3_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD3 = obj.PD3;
            if (obj.IsPD4)
            {
                _IsPD4_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD4_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD4 = obj.PD4;
            if (obj.IsPD5)
            {
                _IsPD5_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD5_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD5 = obj.PD5;
            if (obj.IsPD6)
            {
                _IsPD6_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD6_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD6 = obj.PD6;
            if (obj.IsPD7)
            {
                _IsPD7_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD7_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD7 = obj.PD7;
            if (obj.IsPD8)
            {
                _IsPD8_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD8_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD8 = obj.PD8;
            if (obj.IsPD9)
            {
                _IsPD9_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD9_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD9 = obj.PD9;
            if (obj.IsPD10)
            {
                _IsPD10_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsPD10_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _PD10 = obj.PD10;
            if (obj.IsZD1)
            {
                _IsZD1_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsZD1_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _ZD1 = obj.ZD1;
            if (obj.IsZD2)
            {
                _IsZD2_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsZD2_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _ZD2 = obj.ZD2;
            if (obj.IsZD3)
            {
                _IsZD3_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsZD3_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _ZD3 = obj.ZD3;
            if (obj.IsZD4)
            {
                _IsZD4_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsZD4_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _ZD4 = obj.ZD4;
            if (obj.IsCD1)
            {
                _IsCD1_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD1_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD1 = obj.CD1;
            if (obj.IsCD2)
            {
                _IsCD2_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD2_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD2 = obj.CD2;
            if (obj.IsCD3)
            {
                _IsCD3_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD3_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD3 = obj.CD3;
            if (obj.IsCD4)
            {
                _IsCD4_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD4_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD4 = obj.CD4;
            if (obj.IsCD5)
            {
                _IsCD5_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD5_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD5 = obj.CD5;
            if (obj.IsCD6)
            {
                _IsCD6_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD6_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD6 = obj.CD6;
            if (obj.IsCD7)
            {
                _IsCD7_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD7_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD7 = obj.CD7;
            if (obj.IsCD8)
            {
                _IsCD8_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD8_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD8 = obj.CD8;
            if (obj.IsCD9)
            {
                _IsCD9_1 = ScriptHelper.Image.GetBooleanImage(true);
            }
            else
            {
                _IsCD9_2 = ScriptHelper.Image.GetBooleanImage(true);
            }

            _CD9 = obj.CD9;
        }

        /// <summary>
        /// 标识
        /// </summary>
        protected string _ID = "";
        /// <summary>
        /// 编号
        /// </summary>
        protected string _Code = "";
        /// <summary>
        /// 所属合同
        /// </summary>
        protected string _ContractID = "";
        /// <summary>
        /// 本笔申请金额
        /// </summary>
        protected string _Amount = "";
        /// <summary>
        /// 其他
        /// </summary>
        protected string _Other = "";
        /// <summary>
        /// 报送单位
        /// </summary>
        protected string _FromCompany = "";
        /// <summary>
        /// 报送人
        /// </summary>
        protected string _FromEmployee = "";
        /// <summary>
        /// 接收单位
        /// </summary>
        protected string _ToCompany = "";
        /// <summary>
        /// 接收人
        /// </summary>
        protected string _ToEmployee = "";
        /// <summary>
        /// 接收人
        /// </summary>
        protected string _ToEmployeeName = "";
        /// <summary>
        /// 接收时间
        /// </summary>
        protected string _ReceiveDate = "";
        /// <summary>
        /// 创建时间
        /// </summary>
        protected string _CreateTime = "";
        /// <summary>
        /// 创建者
        /// </summary>
        protected string _Creator = "";
        /// <summary>
        /// 状态
        /// </summary>
        protected string _DocRecieveStatus = "";
        /// <summary>
        /// 可行性研究批复报告是否收文
        /// </summary>
        protected string _IsPD1_1 = "";
        protected string _IsPD1_2 = "";
        /// <summary>
        /// 可行性研究批复报告备注
        /// </summary>
        protected string _PD1 = "";
        /// <summary>
        /// 概算批复是否收文
        /// </summary>
        protected string _IsPD2_1 = "";
        protected string _IsPD2_2 = "";
        /// <summary>
        /// 概算批复备注
        /// </summary>
        protected string _PD2 = "";
        /// <summary>
        /// 环境影响审查批复是否收文
        /// </summary>
        protected string _IsPD3_1 = "";
        protected string _IsPD3_2 = "";
        /// <summary>
        /// 环境影响审查批复备注
        /// </summary>
        protected string _PD3 = "";
        /// <summary>
        /// 项目选址意见书是否收文
        /// </summary>
        protected string _IsPD4_1 = "";
        protected string _IsPD4_2 = "";
        /// <summary>
        /// 项目选址意见书备注
        /// </summary>
        protected string _PD4 = "";
        /// <summary>
        /// 用地审查意见是否收文
        /// </summary>
        protected string _IsPD5_1 = "";
        protected string _IsPD5_2 = "";
        /// <summary>
        /// 用地审查意见备注
        /// </summary>
        protected string _PD5 = "";
        /// <summary>
        /// 土地证是否收文
        /// </summary>
        protected string _IsPD6_1 = "";
        protected string _IsPD6_2 = "";
        /// <summary>
        /// 土地证备注
        /// </summary>
        protected string _PD6 = "";
        /// <summary>
        /// 土地出让合同是否收文
        /// </summary>
        protected string _IsPD7_1 = "";
        protected string _IsPD7_2 = "";
        /// <summary>
        /// 土地出让合同备注
        /// </summary>
        protected string _PD7 = "";
        /// <summary>
        /// 建设用地规划许可证是否收文
        /// </summary>
        protected string _IsPD8_1 = "";
        protected string _IsPD8_2 = "";
        /// <summary>
        /// 建设用地规划许可证备注
        /// </summary>
        protected string _PD8 = "";
        /// <summary>
        /// 建设工程规划许可证是否收文
        /// </summary>
        protected string _IsPD9_1 = "";
        protected string _IsPD9_2 = "";
        /// <summary>
        /// 建设工程规划许可证备注
        /// </summary>
        protected string _PD9 = "";
        /// <summary>
        /// 建筑工程施工许可证是否收文
        /// </summary>
        protected string _IsPD10_1 = "";
        protected string _IsPD10_2 = "";
        /// <summary>
        /// 建筑工程施工许可证备注
        /// </summary>
        protected string _PD10 = "";
        /// <summary>
        /// 发票/收据是否收文
        /// </summary>
        protected string _IsZD1_1 = "";
        protected string _IsZD1_2 = "";
        /// <summary>
        /// 发票/收据备注
        /// </summary>
        protected string _ZD1 = "";
        /// <summary>
        /// 预算拨款凭证/银行进账单是否收文
        /// </summary>
        protected string _IsZD2_1 = "";
        protected string _IsZD2_2 = "";
        /// <summary>
        /// 预算拨款凭证/银行进账单备注
        /// </summary>
        protected string _ZD2 = "";
        /// <summary>
        /// 财政资金拨款申请书/建设单位内部支付审批表是否收文
        /// </summary>
        protected string _IsZD3_1 = "";
        protected string _IsZD3_2 = "";
        /// <summary>
        /// 财政资金拨款申请书/建设单位内部支付审批表备注
        /// </summary>
        protected string _ZD3 = "";
        /// <summary>
        /// 其他资金到位证明材料是否收文
        /// </summary>
        protected string _IsZD4_1 = "";
        protected string _IsZD4_2 = "";
        /// <summary>
        /// 其他资金到位证明材料备注
        /// </summary>
        protected string _ZD4 = "";
        /// <summary>
        /// 深圳市政府融资项目资金支付申请表（附件4）是否收文
        /// </summary>
        protected string _IsCD1_1 = "";
        protected string _IsCD1_2 = "";
        /// <summary>
        /// 深圳市政府融资项目资金支付申请表（附件4）备注
        /// </summary>
        protected string _CD1 = "";
        /// <summary>
        /// 工程款支付汇总表（附件5）是否收文
        /// </summary>
        protected string _IsCD2_1 = "";
        protected string _IsCD2_2 = "";
        /// <summary>
        /// 工程款支付汇总表（附件5）备注
        /// </summary>
        protected string _CD2 = "";
        /// <summary>
        /// 监理合同是否收文
        /// </summary>
        protected string _IsCD3_1 = "";
        protected string _IsCD3_2 = "";
        /// <summary>
        /// 监理合同备注
        /// </summary>
        protected string _CD3 = "";
        /// <summary>
        /// 票据（发票/收据）是否收文
        /// </summary>
        protected string _IsCD4_1 = "";
        protected string _IsCD4_2 = "";
        /// <summary>
        /// 票据（发票/收据）备注
        /// </summary>
        protected string _CD4 = "";
        /// <summary>
        /// 工程款支付内部审批表是否收文
        /// </summary>
        protected string _IsCD5_1 = "";
        protected string _IsCD5_2 = "";
        /// <summary>
        /// 工程款支付内部审批表备注
        /// </summary>
        protected string _CD5 = "";
        /// <summary>
        /// 施工单位或其他相关单位工程款支付申请书是否收文
        /// </summary>
        protected string _IsCD6_1 = "";
        protected string _IsCD6_2 = "";
        /// <summary>
        /// 施工单位或其他相关单位工程款支付申请书备注
        /// </summary>
        protected string _CD6 = "";
        /// <summary>
        /// 项目用款计划表（附件7）是否收文
        /// </summary>
        protected string _IsCD7_1 = "";
        protected string _IsCD7_2 = "";
        /// <summary>
        /// 项目用款计划表（附件7）备注
        /// </summary>
        protected string _CD7 = "";
        /// <summary>
        /// 单项工程施工合同或工程设计、咨询合同等是否收文
        /// </summary>
        protected string _IsCD8_1 = "";
        protected string _IsCD8_2 = "";
        /// <summary>
        /// 单项工程施工合同或工程设计、咨询合同等备注
        /// </summary>
        protected string _CD8 = "";
        /// <summary>
        /// 中标通知书是否收文
        /// </summary>
        protected string _IsCD9_1 = "";
        protected string _IsCD9_2 = "";
        /// <summary>
        /// 中标通知书备注
        /// </summary>
        protected string _CD9 = "";
        /// <summary>
        /// 报送人电话
        /// </summary>
        protected string _FromEmployeePhone = "";

        protected string _ProjectName = "";
        protected string _ProjectCode = "";
        protected string _Owner = "";
        protected string _Contractor = "";
        protected string _ContractName = "";
    }
}